<template>
  <div style="width:100%;height:100vh;overflow: hidden;background: pink linear-gradient(to right, rgb(247,209,215),rgb(191,227,241));">
    <div style="margin-top: 220px">
      <h1>GitHubCN</h1>
      <p>欢迎访问</p>
    </div>
    <div>
      <el-button @click='link' type="success">立马登录</el-button>
    </div>
  </div>
</template>

<script>


export default {
  name: 'HomeView',
  components: {

  },
  data(){
    return{
    }
  },
  methods:{
    link(){
      this.$router.push("/login")//跳转到主页面
    },
  },
  created(){
    console.log("123")
    if(sessionStorage.getItem("userId")!==null)
      this.$router.push("/"+sessionStorage.getItem("userName"))
  }
}
</script>
